//
//  UICollectionView+register.m
//  share_business
//
//  Created by baidufz on 2017/9/15.
//  Copyright © 2017年 wyl. All rights reserved.
//

#import "UICollectionView+RegisterCell.h"

@implementation UICollectionView (RegisterCell)


- (void)registerHeaderCell:(nullable Class)cls {
    [self registerNib:[UINib nibWithNibName:NSStringFromClass(cls) bundle:[NSBundle mainBundle]] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:NSStringFromClass(cls)];
}
- (void)registerFooterCell:(nullable Class) cls {
    [self registerNib:[UINib nibWithNibName:NSStringFromClass(cls) bundle:[NSBundle mainBundle]] forSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:NSStringFromClass(cls)];
}
- (void)registerCell:(nullable Class)cls {
    [self registerNib:[UINib nibWithNibName:NSStringFromClass(cls) bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:NSStringFromClass(cls)];
}


@end
